package com.zsrt.java.day20161227.wrl.demo05;

import org.junit.Test;

public class ArrayUpdateTest {
	
	/**
	 * 把9修改成88
	 * @throws Exception
	 */
	@Test
	public void xx() throws Exception {
		int[] oldAs = new int[]{5,8,9,2,30};
		
		//1.找到元素9的下标
		int index9 = 3;
		
		//2.修改下标所在的这个元素的值为88
		oldAs[index9] = 88;
		
		//3.打印数组
		for(int v : oldAs){
			System.out.print(v+" ");
		}
	}

}
